package com.demo.design.behavioral.memento;

import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Stack;

public class CareTaker {
    private Stack<Memento> queue = new Stack<>();

    public Memento getMemento() {
        return queue.pop();
    }

    public void setMemento(Memento memento) {
        queue.push(memento);
    }
}
